<?php if (!defined("BASEPATH")) exit("No direct script access allowed"); ?>

<div id="UserContainer"></div>

<script type="text/javascript">

	Ext.onReady(function() {

		new Ext.TabPanel({
			id: 'UserTabs',
			autoHeight: true,
			renderTo: 'UserContainer',
			border: false,
			enableTabScroll: true
		});


		Ext.getCmp('UserTabs').add({
			title: '<?=$this->db->escape_str($this->lang->line("ADMINISTRATORS"))?>',
			id: 'Tab_Admin',
			autoLoad:{url: '<?=site_url()?>admin/user/Admin', scripts:true},
			listeners: {
				activate: function(panel) {
					Ext.getCmp('UserTabs').getActiveTab().getUpdater().refresh();
				},
				afterrender: function() {
					Ext.getCmp('Tab_Admin').setHeight('auto');
				}
			}
		}).show();

		Ext.getCmp('UserTabs').add({
			title: '<?=$this->db->escape_str($this->lang->line("VISITORS"))?>',
			id: 'Tab_Visitor',
			listeners: {
				activate: function(panel) {
					Ext.getCmp('UserTabs').getActiveTab().getUpdater().refresh();
				},
				afterrender: function() {
					Ext.getCmp('Tab_Visitor').setHeight('auto');
				}
			},
			autoLoad:{url: '<?=site_url()?>admin/user/Visitor', scripts:true}
		});

	})

</script>